Skip to content

[MINOR][VL] Use resize() instead of reserve() in getEmitInfo#11623

Merged
rui-mo merged 1 commit intoapache:mainfrom
acvictor:acvictor/fixReserveOperatorUB
Feb 18, 2026
Merged

[MINOR][VL] Use resize() instead of reserve() in getEmitInfo#11623
rui-mo merged 1 commit intoapache:mainfrom
acvictor:acvictor/fixReserveOperatorUB

Conversation

@acvictor
Copy link
Contributor

What changes are proposed in this pull request?

This PR replaces reserve() with resize() for projectNames and expressions vectors in getEmitInfo(). std::vector::reserve() allocates capacity but does not change size(). The subsequent loop assigns elements via operator[] which accesses indices beyond size() and this is undefined behaviour.

How was this patch tested?

Existing tests.

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the VELOX label Feb 17, 2026
@acvictor acvictor marked this pull request as ready for review February 17, 2026 08:55
@acvictor
Copy link
Contributor Author

@rui-mo can you please review this minor change? Thanks in advance!

Copy link
Contributor

@rui-mo rui-mo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@rui-mo rui-mo merged commit e3ba961 into apache:main Feb 18, 2026
57 of 58 checks passed
@acvictor acvictor deleted the acvictor/fixReserveOperatorUB branch March 3, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants